<?php

$traduccion = new Zend_Translate('array', APPLICATION_PATH . '/idiomas/es.php', 'es');  
Zend_Form::setDefaultTranslator($traduccion);  

class Application_Form_Role extends Zend_Form
{
    protected function generaDecorador() {
         return array(
                    array('Errors',array('tag' => 'div')),
                    'ViewHelper',
                    'Description',
                    array('Label'),
                    array('HtmlTag', array('tag' => 'Fieldset', 'class' => 'elemento'))
                ); 
    }

    public function init()
    {
        $this->addElement('select', 'role', array(
            'label'      => '',
            'decorators' => $this->generaDecorador(),
            'multiOptions' => array('admin' => 'admin', 
                                'adminBlog' => 'adminBlog', 
                                'adminCarreras' => 'adminCarreras', 
                                'adminMateriales' => 'adminMateriales', 
                                'miembro' => 'miembro')
        ));

        $this->addElement(
            'submit', 'Cambiar', array('class' => 'btn btn-danger')
        );
        
        
        $this->setAttrib('class','form-inline');
                
    }
    
}